package com.wfcm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.wfcm.dao.WfChapterPlayRecordDao;
import com.wfcm.datasource.DataSourceContextHolder;
import com.wfcm.datasource.DynamicDataSource;
import com.wfcm.datasource.DynamicDataSourceAnnotation;
import com.wfcm.entity.WfChapterPlayRecordEntity;
import com.wfcm.service.WfChapterPlayRecordService;



@Service("wfChapterPlayRecordService")
@DynamicDataSourceAnnotation
public class WfChapterPlayRecordServiceImpl implements WfChapterPlayRecordService {
	@Autowired
	private WfChapterPlayRecordDao wfChapterPlayRecordDao;
	
	@Override
	public WfChapterPlayRecordEntity queryObject(Integer id){
		return wfChapterPlayRecordDao.queryObject(id);
	}

	@Override
	public WfChapterPlayRecordEntity queryPlaylog(Integer uid){
		return wfChapterPlayRecordDao.queryPlaylog(uid);
	}


	@Override
	public List<WfChapterPlayRecordEntity> queryList(Map<String, Object> map){
		return wfChapterPlayRecordDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return wfChapterPlayRecordDao.queryTotal(map);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_real)
	public void save(WfChapterPlayRecordEntity wfChapterPlayRecord){
		wfChapterPlayRecordDao.save(wfChapterPlayRecord);
	}
	
	@Override
	public void update(WfChapterPlayRecordEntity wfChapterPlayRecord){
		wfChapterPlayRecordDao.update(wfChapterPlayRecord);
	}
	
	@Override
	public void delete(Integer id){
		wfChapterPlayRecordDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		wfChapterPlayRecordDao.deleteBatch(ids);
	}
	
}
